# Maintainer: Cían Hughes <Ci@nHugh.es>
pkgname=knxd
pkgver=0.14.39
pkgrel=1
pkgdesc="Knxd is an advanced KNX router/gateway; it can talk to all known KNX interfaces"
arch="all"
url="https://github.com/knxd/knxd"
license="GPL-2.0-only"
makedepends="fmt-dev linux-headers libev-dev libusb-dev argp-standalone bsd-compat-headers automake autoconf libtool m4"
source="$pkgname-$pkgver.tar.gz::https://codeload.github.com/knxd/knxd/tar.gz/$pkgver"
options="!check" # no tests

subpackages="$pkgname-dev"

prepare() {
	default_prepare

	printf "#!/bin/sh\n\necho %s" "$pkgver" > ./tools/version.sh
	./bootstrap.sh
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-systemd
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="e376ca39a0a990c13e11a79a33acead8d19c6ec546f4f924645c59f3980d902e3384189dfbb4a03984d9e3bab44fa7e961a5a2538a31babd1a71c66d0d6cbe90  knxd-0.14.39.tar.gz"
